<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <button onclick="start()">弹出</button>
    <button onclick="stop()">停止弹出</button>
</body>
<script>
    var myvar;
    function start(){
        
         myvar = window.setInterval("alert('间隔1s弹出内容');",1000)
    }
    function stop(){
        window.clearInterval(myvar)
    }

</script>
</html>